package com.example.demo.vo.bug;

import com.example.demo.po.bug.Bug;
import com.example.demo.po.picture.Picture;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public class BugInfoVO {
    private String description;
    private String procedure;
    private int deviceInfo;
    private List<String> pictures;

    public BugInfoVO(String description, String procedure, int deviceInfo, List<String> pictures) {
        this.description = description;
        this.procedure = procedure;
        this.deviceInfo = deviceInfo;
        this.pictures = pictures;
    }

    public BugInfoVO(){
        this.pictures=new ArrayList<>();
    }
    public BugInfoVO(Bug bug){
        this.description= bug.getDescription();
        this.procedure= bug.getProcedure();
        this.deviceInfo= bug.getDeviceInfo();
        this.pictures=new ArrayList<>();
    }

    public void addPicture(Picture picture){
        pictures.add(picture.getAddress());
    }
}
